#pragma once
#include <unordered_map>
#include <cstring>
#include <JsonParser/Parser.hpp>
#include <Resource.h>
// #include <Animation.h>
#include <CollisionManagement.h>
class Data{
    private:
        Data() = default;
        ~Data() = default;
        static Data* instance;
        std::unordered_map<std::string,ym::Json*> datas_map;
    public:
        char datapath[BUFSIZ]={};
        static Data* getInstance();
        void load();
        void loadImage();
        void loadAnimation();
        void quit();
        void setPath(const char* path);
        void loadData(const char* name,const char* path);
        ym::Json* getData(const char* name);
};